package com.bdqn.oa.dao;

import com.bdqn.oa.entity.Employee;

import java.sql.SQLException;
import java.util.List;

public interface EmployeeDao {
    /**
     * 通过部门ID查询部门的员工
     *
     * @param deptid
     * @return
     */
    public List<Employee> listEmployeebyDeptid(Integer deptid) throws SQLException;

    /**
     * 通过直属领导ID查询员工
     *
     * @param leadid
     * @return
     */
    public List<Employee> listEmployeebyLeadid(Integer leadid) throws SQLException;

    /**
     * 通过工号查询员工no
     *
     * @param no
     * @return
     */
    public Employee getEmployeeByNo(String no) throws SQLException;

    /**
     * 通过员工姓名查询员工的信息
     *
     * @param name
     * @return
     */
    public List<Employee> listEmployeebyName(String name) throws SQLException;

    /**
     * 通过身份证查询员工信息
     *
     * @param idcard
     * @return
     */
    public Employee getEmployeeByIdcardNo(String idcard) throws SQLException;

    /**
     * 通过手机号查询员工
     *
     * @param tel
     * @return
     */
    public Employee getEmployeeByTel(String tel) throws SQLException;

    /**
     * 通过工号和密码查询员工
     * @param employee
     * @return
     */
    public Employee getEmloyeeByNoAndPassWord(Employee employee) throws SQLException;

    /**
     * 修改员工的密码（Emloyeee 赋值id  和 password）
     * @param employee
     * @return
     */
    public int updateEmployeePassword(Employee employee) throws SQLException;
    /**
     * 修改员工的电话（Emloyeee 赋值id  和 tel）
     * @param employee
     * @return
     */
    public int updateEmployeeTel(Employee employee) throws SQLException;
    /**
     * 修改员工的邮箱（Emloyeee 赋值id  和 emaile）
     * @param employee
     * @return
     */
    public int updateEmployeeEmail(Employee employee) throws SQLException;
    /**
     * 修改员工的姓名（Emloyeee 赋值id  和 name）
     * @param employee
     * @return
     */
    public int updateEmployeeName(Employee employee) throws SQLException;
    /**
     * 修改员工的身份证（Emloyeee 赋值id  和 IdCardNo）
     * @param employee
     * @return
     */
    public int updateEmployeeIdCardNo(Employee employee) throws SQLException;

    /**
     * 转岗位（ Emloyeee 赋值id修改postid deptid leadid）
     * @param employee
     * @return
     */
    public int updateEmployeePostId(Employee employee) throws SQLException;

    /**
     * 修改角色id（ Emloyeee 赋值id修改roleid）
     * @param employee
     * @return
     */
    public int updateEmployeeRoleId(Employee employee) throws SQLException;

    /**
     * 修改删除标记（（ Emloyeee 赋值id修改roleid））
     * @param employee
     * @return
     */
    public int updateEmployeeDelFlag(Employee employee) throws SQLException;

    /**
     * 通过删除标记查询员工
     * @param employee
     * @return
     * @throws SQLException
     */
    public List<Employee> listEmployeebyDelFlag(Employee employee) throws SQLException;
}
